public class MyStringTest {
    public static void main(String[] args) {
        String a = "hello java";
        String b = "hello java";
        if (a.equals(b)) {
            String c = a.replace(" java", "word");
            System.out.println(c);
            
        }
    }
}
